{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "a818859a-f62f-435e-b609-95ed56f731ac",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[1, 2, 3], [4, 5, 6], 2]\n"
     ]
    }
   ],
   "source": [
    "data1 = [[1,2,3],[4,5,6]]\n",
    "data2 = [2]\n",
    "data1 += data2\n",
    "print(data1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "799326b3-0bca-4da3-acfa-9de0ca3c495e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[3 4 5]\n",
      " [6 7 8]]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "data = np.arange(1,7).reshape(2,-1)\n",
    "data += 2\n",
    "print(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "99c711de-f983-4a58-8880-28b5534bc2ff",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "((1, 2, 3), (4, 5, 6), (2, 2, 2), (2, 2, 2))\n"
     ]
    }
   ],
   "source": [
    "data1 = ((1,2,3),(4,5,6))\n",
    "data2 = ((2,2,2),(2,2,2))\n",
    "data1 += data2\n",
    "print(data1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "3830ce84-b5cd-442f-a907-e4597f0b4dae",
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "unsupported operand type(s) for /=: 'list' and 'int'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[4], line 2\u001b[0m\n\u001b[0;32m      1\u001b[0m data1 \u001b[38;5;241m=\u001b[39m [[\u001b[38;5;241m1\u001b[39m,\u001b[38;5;241m2\u001b[39m,\u001b[38;5;241m3\u001b[39m],[\u001b[38;5;241m4\u001b[39m,\u001b[38;5;241m5\u001b[39m,\u001b[38;5;241m6\u001b[39m]]\n\u001b[1;32m----> 2\u001b[0m data1 \u001b[38;5;241m/\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[0;32m      3\u001b[0m \u001b[38;5;28mprint\u001b[39m(data1)\n",
      "\u001b[1;31mTypeError\u001b[0m: unsupported operand type(s) for /=: 'list' and 'int'"
     ]
    }
   ],
   "source": [
    "data1 = [[1,2,3],[4,5,6]]\n",
    "data1 /= 1\n",
    "print(data1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "4a1a29ed-317e-46d1-a0d0-014116925599",
   "metadata": {},
   "outputs": [
    {
     "ename": "UFuncTypeError",
     "evalue": "Cannot cast ufunc 'divide' output from dtype('float64') to dtype('int32') with casting rule 'same_kind'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mUFuncTypeError\u001b[0m                            Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[5], line 3\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[0;32m      2\u001b[0m data \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39marange(\u001b[38;5;241m1\u001b[39m,\u001b[38;5;241m7\u001b[39m)\u001b[38;5;241m.\u001b[39mreshape(\u001b[38;5;241m2\u001b[39m,\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m)\n\u001b[1;32m----> 3\u001b[0m data \u001b[38;5;241m/\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[0;32m      4\u001b[0m \u001b[38;5;28mprint\u001b[39m(data)\n",
      "\u001b[1;31mUFuncTypeError\u001b[0m: Cannot cast ufunc 'divide' output from dtype('float64') to dtype('int32') with casting rule 'same_kind'"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "data = np.arange(1,7).reshape(2,-1)\n",
    "data /= 1\n",
    "print(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "cee6acb5-011c-4464-ac97-2d24ad62cfaa",
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "unsupported operand type(s) for /=: 'tuple' and 'int'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[6], line 3\u001b[0m\n\u001b[0;32m      1\u001b[0m data1 \u001b[38;5;241m=\u001b[39m ((\u001b[38;5;241m1\u001b[39m,\u001b[38;5;241m2\u001b[39m,\u001b[38;5;241m3\u001b[39m),(\u001b[38;5;241m4\u001b[39m,\u001b[38;5;241m5\u001b[39m,\u001b[38;5;241m6\u001b[39m))\n\u001b[0;32m      2\u001b[0m data2 \u001b[38;5;241m=\u001b[39m ((\u001b[38;5;241m2\u001b[39m,\u001b[38;5;241m2\u001b[39m,\u001b[38;5;241m2\u001b[39m),(\u001b[38;5;241m2\u001b[39m,\u001b[38;5;241m2\u001b[39m,\u001b[38;5;241m2\u001b[39m))\n\u001b[1;32m----> 3\u001b[0m data1 \u001b[38;5;241m/\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[0;32m      4\u001b[0m \u001b[38;5;28mprint\u001b[39m(data1)\n",
      "\u001b[1;31mTypeError\u001b[0m: unsupported operand type(s) for /=: 'tuple' and 'int'"
     ]
    }
   ],
   "source": [
    "data1 = ((1,2,3),(4,5,6))\n",
    "data2 = ((2,2,2),(2,2,2))\n",
    "data1 /= 1\n",
    "print(data1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9872d559-1e81-49af-b633-0a66efc1c931",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
